fix(youtube): extract playlist videos from lockups#70
Open
Priveetee wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while working on TypeType public YouTube playlist support:
Priveetee/TypeType#57
Refs:
Related:
Summary
While working on public YouTube playlist support for TypeType, I found that PipePipeExtractor can load playlist metadata but returns no videos for affected YouTube playlists.
This fixes YouTube playlists returning empty
relatedItemswhen YouTube serves playlist entries aslockupViewModelitems instead of the olderplaylistVideoListRenderer/playlistVideoRendererlayout.Problem
Current playlist extraction can still load the playlist title, thumbnail and stream count, but
relatedItemsis empty.Observed on a public YouTube playlist:
The current response no longer contains the old playlist video renderers:
but it does contain the current lockup format:
So the extractor was successfully loading the playlist page, but ignored the current video item layout.
Changes
YoutubePlaylistExtractorwhenplaylistVideoListRendereris absent.lockupViewModelvideo entries from playlist item sections.richItemRenderer.content.lockupViewModelentries too.YoutubeLockupStreamInfoItemExtractorforLOCKUP_CONTENT_TYPE_VIDEOandLOCKUP_CONTENT_TYPE_EPISODE.Validation
git diff --check./gradlew :extractor:compileJava./gradlew :extractor:compileTestJavaBefore:
After:
Sample extracted items:
Notes
This is intentionally limited to the playlist extractor. Search and channel tabs already have separate lockup handling paths, so this only fixes playlist pages where
PlaylistInfo.getInfo(...)was returning an empty item list.